{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcsslist.css">
<style type="text/css">
    .ygrow{margin-top: 20px;}
      .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 60px;height: 60px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
    .yg5_tr2>td{padding: 10px 15px;border: 1px solid #e5e5e5;text-align: center;}
    .yg5_tr1>th{
        border: 1px solid #e5e5e5;
        padding-left: 15px;
        background-color: #FAFAFA;
        font-weight: bold;
        text-align: center;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .storered{padding: 6px 20px;border-radius: 5px;float: right;margin-right: 478px}
 </style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div> 
    <li {if $type=='ing'} class="active" {/if}><a href="{php echo $this->createWebUrl('group',array('type'=>ing));}">拼团中</a></li>
    <li {if $type=='success'} class="active" {/if}><a href="{php echo $this->createWebUrl('group',array('type'=>success));}">拼团成功</a></li>
    <li {if $type=='fail'} class="active" {/if}><a href="{php echo $this->createWebUrl('group',array('type'=>fail));}">拼团失败</a></li>
    <li {if $type=='all'} class="active" {/if}><a href="{php echo $this->createWebUrl('group',array('type'=>all));}">全部拼团</a></li>
</ul>
<div class="row ygrow">
    <div class="col-lg-11 nav_head">
        <form action="" method="get" class="col-md-4" style="padding-left: 0">
            <input type="hidden" name="c" value="site" />
            <input type="hidden" name="a" value="entry" />
            <input type="hidden" name="m" value="zh_tcwq" />
            <input type="hidden" name="do" value="group" />
            <div class="input-group" style="width: 300px;">
                <input type="text" name="keywords" class="form-control" placeholder="请输入商品名称/团ID/商家名称">
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit" value="查找"/>
                </span>
            </div>
            <input type="hidden" name="token" value="{$_W['token']}"/>
        </form>
        <form action="" method="get" class="col-md-4">
                   <input type="hidden" name="c" value="site" />
                   <input type="hidden" name="a" value="entry" />
                   <input type="hidden" name="m" value="zh_tcwq" />
                   <input type="hidden" name="do" value="group" />
            <div class="input-group" style="width: 100px">
                {php echo tpl_form_field_daterange('time',$_GPC['time'],true);}
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit2" value="查找"/>
                </span>
                <!--  <input type="submit" class="btn btn-sm ordersucess" name="export_submit" value="导出"/> -->
            </div><!-- /input-group -->
            <input type="hidden" name="token" value="{$_W['token']}"/>
        </form>
    </div>
</div>  

<div class="main">
    <div class="panel panel-default">
        <div class="panel-heading">
            拼团信息
        </div>                
        <div class="panel-body" style="padding: 0px 15px;">
            <div class="row">
                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1">
                  
                        <th class="col-md-2 store_td1">团ID</th>
                        <th class="col-md-2 store_td1">所属商家</th>
                        <th class="col-md-2">商品名称</th>                       
                        <th class="col-md-1">团进度</th>
                         <th class="col-md-2">开团时间</th>
                         <th class="col-md-2">到期时间</th>
                         <th class="col-md-1">状态</th>
                        <th class="col-md-2">操作</th>
                    </tr>
                    {loop $list $row}
                    <tr class="yg5_tr2">
                        <td><div class="type-parent">{$row['id']}&nbsp;&nbsp;</div></td>
                         <td>{$row['store_name']}</td>
                        <td>{$row['goods_name']}</td>
                        <td>{$row['yg_num']}/{$row['kt_num']}</td>
                        <td>{php echo date('Y-m-d H:i:s',$row['kt_time'])}</td>
                           <td>{php echo date('Y-m-d H:i:s',$row['dq_time'])}</td>
                        {if $row['state']==1}
                        <td >
                           <span class="label label-danger">拼团中</span>
                       </td>
                       {elseif $row['state']==2}
                       <td >
                           <span class="label label-success">拼团成功</span>
                       </td>
                         {elseif $row['state']==3}
                       <td >
                           <span class="label label-default">拼团失败</span>
                       </td>
                       {/if}
                     
                        <td>
                           <a href="{php echo $this->createWebUrl('groupteam', array('id' => $row['id']))}" class="storespan btn btn-xs" >
                              <span class="fa fa-pencil-square-o" style="margin-right: 0"></span>
                              <span class="bianji">查看详情
                                  <span class="arrowdown"></span>
                              </span>                            
                          </a>
                        </td>
                    </tr>

                    {/loop}
                   
                   {if empty($list)}
                    <tr class="yg5_tr2">
                        <td colspan="11">
                          暂无团信息
                        </td>
                    </tr>
                    {/if} 
                </table>
            </div>
        </form>
    </div>
   
</div>
<div class="text-right we7-margin-top">
{$pager}
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-22").show();
        $("#yframe-22").addClass("wyactive");
      
    })
</script>